import request from '@/utils/request'

// 创建用户
export function createPropertyUsers(data) {
  return request({
    url: '/ipark/property-users/create',
    method: 'post',
    data: data
  })
}

// 更新用户
export function updatePropertyUsers(data) {
  return request({
    url: '/ipark/property-users/update',
    method: 'put',
    data: data
  })
}

// 删除用户
export function deletePropertyUsers(id) {
  return request({
    url: '/ipark/property-users/delete?id=' + id,
    method: 'delete'
  })
}

// 获得用户
export function getPropertyUsers(id) {
  return request({
    url: '/ipark/property-users/get?id=' + id,
    method: 'get'
  })
}

// 获得用户分页
export function getPropertyUsersPage(params) {
  return request({
    url: '/ipark/property-users/page',
    method: 'get',
    params
  })
}
// 导出用户 Excel
export function exportPropertyUsersExcel(params) {
  return request({
    url: '/ipark/property-users/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}